<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible"
        content="ie=edge">
  {% block title %}<title>Local Library</title>{% endblock %}
  {% load static %}
  <link rel="stylesheet"
        href="{% static 'css/bootstrap.v3.3.7.min.css' %}">
  <script src="{% static 'lib/jquery.1.12.4.min.js' %}"></script>
  <script src="{% static 'lib/bootstrap.v3.3.7.min.js' %}"></script>
  <link rel="stylesheet"
        href="{% static 'css/styles.css' %}">
</head>
</head>

<body>
  <div class="container-fluid">

    <div class="row">
      <div class="col-sm-2">
        {% block sidebar %}
        <ul class="sidebar-nav">
          <li><a href="{% url 'index' %}">Home</a></li>
          <li><a href="{% url 'books' %}">All books</a></li>
          <li><a href="{% url 'authors' %}">All authors</a></li>
        </ul>
        {% if user.is_authenticated %}
        <li>User: {{ user.get_username }}</li>
        <li><a href="{% url 'my-borrowed'%}">My Borrowed</a></li>
        <li><a href="{% url 'logout'%}?next={{request.path}}">Logout</a></li>
        {% else %}
        <li><a href="{% url 'login'%}?next={{request.path}}">Login</a></li>
        {% endif %}
        {% endblock %}
      </div>
      <div class="col-sm-10 ">
        {% block content %}{% endblock %}
      </div>
    </div>

  </div>
</body>

</html>
